package com.bbb.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserWorks {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String imageUrl;

    private String textContent;

    private Integer likesCount;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    private String type;

    @TableField(exist = false)
    private String authorName;

    @TableField(exist = false)
    private Integer likeWork;

    @TableField(exist = false)
    private Integer likeAuthor;
}
